package com.kinghood.infrastructure.model.enums;

/**
 * 描述:
 * 创建人：jp
 * 创建时间：2024/1/10 14:21
 */
public enum StatusEnum {

    Enable(1,"启用"),
    disEnable(0, "停用"),
    ;

    StatusEnum(Integer status, String name) {
        this.status = status;
        this.name = name;
    }

    private Integer status;

    private String name;

    public Integer getStatus() {
        return status;
    }

    public String getName() {
        return name;
    }

    public static String getNameByStatus(Integer status) {
        for (StatusEnum myEnum : StatusEnum.values()) {
            if (myEnum.getStatus().equals(status)) {
                return myEnum.getName();
            }
        }
        return null;
    }
}
